<%@ taglib prefix="s" uri="/struts-tags" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/5/14
  Time: 9:54
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>使用JSON插件</title>
    <script src="JSON/jquery-3.3.1.js" type="text/javascript"></script>
</head>
<body>
<form id="loginl">
    用户名:<input type="text" name="user"/><br/>
    密码:<input type="text" name="pass" /><br/>
    <tr>
        <td colspan="2">
            <input id="loginBn" type="button" value="提交"/>
        </td>
    </tr>
</form>
<div id="show" style="display: none;"></div>
<script type="text/javascript">
    $("#loginBn").click(function () {
    $("#show").hide();
    $.get("loginl",$("#loginl").serializeArray(),
        function (data,statusText)
            {
            $("#show").height(80).width(240).css("border","1px solid black").css("border-radius","15px").css("background-color","#efef99").css("color","#ff0000").empty();
            $("#show").append("result:"+data+"<br/>");
            $("#show").append(600);
            },"html");
    });
</script>
</body>
</html>
